#ifndef TD_BASE_TEXT_MESSAGE_H_
#define TD_BASE_TEXT_MESSAGE_H_

/************************************************************************/
/* STL                                                                  */
/************************************************************************/
#include <string>


/************************************************************************/
/* PROJECT                                                              */
/************************************************************************/

/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/BaseEntity.h"
#include "Core/Coord2D.h"

/************************************************************************/
/* Resources                                                            */
/************************************************************************/
#include "Resources/Tiles/Tile.h"
#include "Resources/SDLFont.h"
#include "Resources/ResourceManager.h"

using namespace TD_Core;

namespace TD_GUI {

	typedef enum {
		textSolid,
		textShaded,
		textBlended
	} renderType;

	class BaseTextMessage : public Tile {

	protected:
		/** String containing the message text.*/
		string m_text;
		
		renderType m_renderType;
		shared_ptr<SDLFont> m_pFont;
		SDL_Color m_fontColor;

	public:

		/************************************************************************/
		/* ctors and dtors					                                    */
		/************************************************************************/
		//Default constructor
		explicit BaseTextMessage();

		//Copy constructor
		explicit BaseTextMessage(const BaseTextMessage &rhs);

		//Assignment constructor
		BaseTextMessage& operator=(const BaseTextMessage &rhs);

		//Destructor
		~BaseTextMessage();

		//Initialization constructor
		BaseTextMessage(const Coord2D &textPos, const string &initString, const string &fontSource, unsigned int fontSize, const Color &fontColor, renderType g_renderType = textBlended);

		/************************************************************************/
		/* Access functions                                                     */
		/************************************************************************/
		inline const string & getText() const {
			return(m_text);
		}
		
		void setText(const string & text);


		/************************************************************************/
		/* Rendering                                                            */
		/************************************************************************/
		virtual void render(SDL_Surface *const g_destSurface, unsigned int deltaTime);
	};
}
#endif